/*
** init.c for dayday in /home/dd/projs/dayday/srcs/client/init
** 
** Made by dd
** Login   <alletr_p@epitech.net>
** 
** Started on  Tue Jul 21 15:27:19 2009 dd
** Last update Wed Jul 22 12:24:57 2009 dd
*/

#include <assert.h>
#include <string.h>
#include <GL/glut.h>

#include "client.h"

int	init(t_all *all, int ac, char **av)
{
  assert(all);
  memset(all, sizeof(*all), 0);
  if (init_args(all, ac, av) == FAILURE)
    return (FAILURE);
  if (init_sdl(all) == FAILURE)
    return (FAILURE);
  if (init_opengl(all) == FAILURE)
    return (FAILURE);
  glutInit(&ac, av);
  all->game.state = ON;
  return (SUCCESS);
}
